package com.hexu.event.controller;

import com.hexu.event.entity.User;
import jakarta.servlet.*;
import jakarta.servlet.http.*;

import java.io.IOException;


public class UserFindServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //调用请求对象，向tomcat索要当前用户在服务端私人储物柜
        HttpSession session = request.getSession();
        User user = (User) session.getAttribute("user");
        //通过请求转发，向Tomcat索要UserFind.jsp，将用户信息写入到响应体
        request.setAttribute("key", user);
        request.getRequestDispatcher("/UserFind.jsp").forward(request, response);

    }

}
